/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package prueba.rutas;

/**
 *
 * @author Marcy
 */
public class Pendiente {
     

 public double Pendientex(double x, double y,double x1, double y1,double x2, double y2)
    {
      return (((x-(x1*Mapa.FW)/((x2-x1)*Mapa.FW))*((y2-y1)*Mapa.FH))+(y1*Mapa.FH));
    }
public double Pendientey(double x, double y,double x1, double y1,double x2, double y2)
    {
      return (((y-(y1*Mapa.FH)/((y2-y1)*Mapa.FH))*((x2-x1)*Mapa.FW))+(x1*Mapa.FW));
    }
 
 
}
